import SHA256 from 'crypto-js/sha256';
import Hex from "crypto-js/enc-hex";



function getDynamicHeader() {

    const timestamp = (Date.now() / 1000).toFixed();
    const token = "3f932c3ab20a48d291ae0f5865f94fd4";
    const paasid = "zk_szmf";
    const nonce = Math.random().toString(36).substring(2);
    const signature = SHA256(timestamp + token + nonce + timestamp).toString(Hex).toUpperCase();


    return {
        "x-tif-paasid": paasid,
        "x-tif-timestamp": timestamp,
        "x-tif-signature": signature,
        "x-tif-nonce": nonce
    }

}


export default getDynamicHeader
